using System;
using DailyPoetryX.AzureStorage.Confidential;
using Microsoft.WindowsAzure.Storage;

namespace DailyPoetryX.AzureStorage.Services.Implementations {
    /// <summary>
    /// Azure存储账户提供者。
    /// </summary>
    public class AzureStorageAccountProvider : IAzureStorageAccountProvider {
        /// <summary>
        /// 云存储账户。
        /// </summary>
        private CloudStorageAccount _account;

        /// <summary>
        /// 获得云存储账户。
        /// </summary>
        public CloudStorageAccount GetAccount() => _account;

        /// <summary>
        /// 构造函数。
        /// </summary>
        public AzureStorageAccountProvider() {
            _account =
                CloudStorageAccount.Parse(AzureStorageSettings
                    .ConnectionString);
        }
    }
}